|
Neurosis Engine
|
#include <model.h>
Public Member Functions | |
| CNeurosisModel () | |
| ~CNeurosisModel () | |
| Constructor/Deconstructor. | |
| void | operator= (CNeurosisModel &rhs) |
| Operators. | |
| int | Add_Point (float3 *newPoint, bool duplicateCheck=true) |
| Add point to model [checks duplicate points by default]. | |
| int | Add_Triangle (int point0, int point1, int point2) |
| Add triangle to model. | |
| void | Add_Triangle (int iTexture, float bottomLeftX, float bottomLeftY, float bottomLeftZ, float topRightX, float topRightY, float topRightZ, float topLeftX, float topLeftY, float topLeftZ, float bottomLeftPercentX=0.0f, float bottomLeftPercentY=0.0f, float topRightPercentX=1.0f, float topRightPercentY=1.0f, float topLeftPercentX=0.0f, float topLeftPercentY=1.0f) |
| Add triangle (from parameters passed during Render_Triangle) | |
| void | Add_Quad (int iTexture, float bottomLeftX, float bottomLeftY, float bottomLeftZ, float bottomRightX, float bottomRightY, float bottomRightZ, float topRightX, float topRightY, float topRightZ, float topLeftX, float topLeftY, float topLeftZ, float bottomLeftPercentX=0.0f, float bottomLeftPercentY=0.0f, float bottomRightPercentX=1.0f, float bottomRightPercentY=0.0f, float topRightPercentX=1.0f, float topRightPercentY=1.0f, float topLeftPercentX=0.0f, float topLeftPercentY=1.0f) |
| Add quad (from parameters passed during Render_Quad) | |
| void | Calculate_Centers () |
| Calculates the center of all triangles in model. | |
| void | Calculate_Normals () |
| Calculates the normals of all triangles in model. | |
| void | Calculate_Radius () |
| Calculates the radius of the model based on farthest point. | |
| bool | File_Load (char *filename) |
| Loads model from file - initialized at base point (0, 0, 0), transparency set to 0.0f, mass set to 1.0f. | |
| bool | File_Save (char *filename) |
| Saves model to file. | |
| float | Get_Mass () |
| Get mMass value. | |
| int | Get_Total_Triangles () |
| Get mTotalTriangles value. | |
| int | Get_Total_Points () |
| Get mTotalPoints value. | |
| float | Get_Transparency (int iTriangle) |
| Get mTransparency value for given triangle. | |
| void | Move (float3 *amount, bool modifyPoints=true) |
| Move model by given amount. | |
| bool | Oct_Tree (int iTriangle, CNeurosisModel *destModel, float3 *highBound, float3 *lowBound) |
| Adds triangle to model from destModel if within 2D boundings (does not use .z value yet) | |
| float | Plane_Distance (int iTriangle, int iNormal, float3 *point) |
| Returns distance from plane. | |
| int | Plane_Orientation (int iTriangle, int iNormal, float3 *point) |
| Returns -1 if behind, 1 if in front or on. | |
| float3 | Polygon_Get_Position (int iTriangle, int iPoint) |
| Get position of point. | |
| int | Polygon_Orientation (int iTriangle, float3 *point) |
| Returns -1 if behind, 1 if in front or on, 0 if none. | |
| int | Remove_Point (int index) |
| Remove selected point. | |
| int | Remove_Triangle (int index) |
| Removes selected triangle. | |
| void | Render (int iTriangle=-1, int iMesh=-1, bool isTextured=true) |
| Render model or specific triangle/mesh (textured/untextured) [renders all triangles by default]. | |
| int | Render_Batch (int iArray, SRenderBatch batch[], int iMesh=-1) |
| Store model or specific mesh (returns updated array position) | |
| void | Resize_Points (int newSize) |
| Resizes pPoints structure. | |
| void | Resize_Triangles (int newSize) |
| Resizes pTriangles structure. | |
| void | Rotate_x (float amount) |
| Rotates the model based on the base position around the x axis (Pitch) | |
| void | Rotate_y (float amount) |
| Rotates the model based on the base position around the y axis (Roll) | |
| void | Rotate_z (float amount) |
| Rotates the model based on the base position around the z axis (Yaw) | |
| void | Set_Mass (float amount) |
| Set mMass value [min 0.0f]. | |
| void | Set_Transparency (float amount, int iTriangle=-1) |
| Set mTransparency value [0.0f..1.0f] for given triangle - if iTriangle not given, then all triangles set. | |
Public Attributes | |
| CNeurosisPoints * | pPoints |
| CNeurosisTriangles * | pTriangles |
| float | mRadius |
| float3 | mBase |
| float3 | mCurrent |
| float3 | mPrevious |
| float3 | mVector |
Private Attributes | |
| float | mMass |
| int | mTotalPoints |
| int | mTotalTriangles |
Constructor/Deconstructor.
| int CNeurosisModel::Add_Point | ( | float3 * | newPoint, |
| bool | duplicateCheck = true |
||
| ) |
Add point to model [checks duplicate points by default].
| void CNeurosisModel::Add_Quad | ( | int | iTexture, |
| float | bottomLeftX, | ||
| float | bottomLeftY, | ||
| float | bottomLeftZ, | ||
| float | bottomRightX, | ||
| float | bottomRightY, | ||
| float | bottomRightZ, | ||
| float | topRightX, | ||
| float | topRightY, | ||
| float | topRightZ, | ||
| float | topLeftX, | ||
| float | topLeftY, | ||
| float | topLeftZ, | ||
| float | bottomLeftPercentX = 0.0f, |
||
| float | bottomLeftPercentY = 0.0f, |
||
| float | bottomRightPercentX = 1.0f, |
||
| float | bottomRightPercentY = 0.0f, |
||
| float | topRightPercentX = 1.0f, |
||
| float | topRightPercentY = 1.0f, |
||
| float | topLeftPercentX = 0.0f, |
||
| float | topLeftPercentY = 1.0f |
||
| ) |
Add quad (from parameters passed during Render_Quad)
| int CNeurosisModel::Add_Triangle | ( | int | point0, |
| int | point1, | ||
| int | point2 | ||
| ) |
Add triangle to model.
| void CNeurosisModel::Add_Triangle | ( | int | iTexture, |
| float | bottomLeftX, | ||
| float | bottomLeftY, | ||
| float | bottomLeftZ, | ||
| float | topRightX, | ||
| float | topRightY, | ||
| float | topRightZ, | ||
| float | topLeftX, | ||
| float | topLeftY, | ||
| float | topLeftZ, | ||
| float | bottomLeftPercentX = 0.0f, |
||
| float | bottomLeftPercentY = 0.0f, |
||
| float | topRightPercentX = 1.0f, |
||
| float | topRightPercentY = 1.0f, |
||
| float | topLeftPercentX = 0.0f, |
||
| float | topLeftPercentY = 1.0f |
||
| ) |
Add triangle (from parameters passed during Render_Triangle)
| void CNeurosisModel::Calculate_Centers | ( | ) |
Calculates the center of all triangles in model.
| void CNeurosisModel::Calculate_Normals | ( | ) |
Calculates the normals of all triangles in model.
| void CNeurosisModel::Calculate_Radius | ( | ) |
Calculates the radius of the model based on farthest point.
| bool CNeurosisModel::File_Load | ( | char * | filename | ) |
Loads model from file - initialized at base point (0, 0, 0), transparency set to 0.0f, mass set to 1.0f.
| bool CNeurosisModel::File_Save | ( | char * | filename | ) |
Saves model to file.
| float CNeurosisModel::Get_Mass | ( | ) |
Get mMass value.
| int CNeurosisModel::Get_Total_Points | ( | ) |
Get mTotalPoints value.
Get mTotalTriangles value.
| float CNeurosisModel::Get_Transparency | ( | int | iTriangle | ) |
Get mTransparency value for given triangle.
| void CNeurosisModel::Move | ( | float3 * | amount, |
| bool | modifyPoints = true |
||
| ) |
Move model by given amount.
| bool CNeurosisModel::Oct_Tree | ( | int | iTriangle, |
| CNeurosisModel * | destModel, | ||
| float3 * | highBound, | ||
| float3 * | lowBound | ||
| ) |
Adds triangle to model from destModel if within 2D boundings (does not use .z value yet)
| void CNeurosisModel::operator= | ( | CNeurosisModel & | rhs | ) |
Operators.
| float CNeurosisModel::Plane_Distance | ( | int | iTriangle, |
| int | iNormal, | ||
| float3 * | point | ||
| ) |
Returns distance from plane.
| int CNeurosisModel::Plane_Orientation | ( | int | iTriangle, |
| int | iNormal, | ||
| float3 * | point | ||
| ) |
Returns -1 if behind, 1 if in front or on.
| float3 CNeurosisModel::Polygon_Get_Position | ( | int | iTriangle, |
| int | iPoint | ||
| ) |
Get position of point.
| int CNeurosisModel::Polygon_Orientation | ( | int | iTriangle, |
| float3 * | point | ||
| ) |
Returns -1 if behind, 1 if in front or on, 0 if none.
| int CNeurosisModel::Remove_Point | ( | int | index | ) |
Remove selected point.
| int CNeurosisModel::Remove_Triangle | ( | int | index | ) |
Removes selected triangle.
| void CNeurosisModel::Render | ( | int | iTriangle = -1, |
| int | iMesh = -1, |
||
| bool | isTextured = true |
||
| ) |
Render model or specific triangle/mesh (textured/untextured) [renders all triangles by default].
| int CNeurosisModel::Render_Batch | ( | int | iArray, |
| SRenderBatch | batch[], | ||
| int | iMesh = -1 |
||
| ) |
Store model or specific mesh (returns updated array position)
| void CNeurosisModel::Resize_Points | ( | int | newSize | ) |
Resizes pPoints structure.
| void CNeurosisModel::Resize_Triangles | ( | int | newSize | ) |
Resizes pTriangles structure.
| void CNeurosisModel::Rotate_x | ( | float | amount | ) |
Rotates the model based on the base position around the x axis (Pitch)
| void CNeurosisModel::Rotate_y | ( | float | amount | ) |
Rotates the model based on the base position around the y axis (Roll)
| void CNeurosisModel::Rotate_z | ( | float | amount | ) |
Rotates the model based on the base position around the z axis (Yaw)
| void CNeurosisModel::Set_Mass | ( | float | amount | ) |
Set mMass value [min 0.0f].
| void CNeurosisModel::Set_Transparency | ( | float | amount, |
| int | iTriangle = -1 |
||
| ) |
Set mTransparency value [0.0f..1.0f] for given triangle - if iTriangle not given, then all triangles set.
float CNeurosisModel::mMass [private] |
| float CNeurosisModel::mRadius |
int CNeurosisModel::mTotalPoints [private] |
int CNeurosisModel::mTotalTriangles [private] |
1.7.6.1